﻿using PagedList;
using System.Collections.Generic;
using System.Web.Security;

namespace FB.Membership
{
	public interface IRolesService
	{
		bool Enabled { get; }
		IEnumerable<string> FindAll();
		IEnumerable<string> FindByUser(MembershipUser user);
		IEnumerable<string> FindByUserName(string userName);
		IEnumerable<string> FindUserNamesByRole(string roleName);
        IPagedList<string> FindUsersByRole(string roleName, string usernameToMatch, int pageNumber, int pageSize);

		void AddToRole(MembershipUser user, string roleName);
		void RemoveFromRole(MembershipUser user, string roleName);
        void RemoveFromRole(List<MembershipUser> users, string roleName);
		void RemoveFromAllRoles(MembershipUser user);
		bool IsInRole(MembershipUser user, string roleName);
		void Create(string roleName);
		void Delete(string roleName);
	}
}